unit oTable;

interface

uses oLogicalEntity, XMLIntf, oEntityTypeConstants, oIstoreable;

type
  TTable = class(TLogicalEntity)
    public
      destructor Destroy; override;
      procedure save(paKam: IXMLNode;paKtory: Integer);
      function vypis:String;
      procedure SaveToXML(var paNode : Ixmlnode); override;
      procedure LoadFromXML(paNode : IXMLNode); override;
      constructor Create(paName : string; paId : integer); overload;
      constructor Create; overload;
 end;

implementation

uses SysUtils;

{ TTabula }

constructor TTable.Create;
begin
  inherited;
  TypeLogic := ET_TABLE_TYPE;
end;

constructor TTable.Create(paName: string; paId: integer);
begin
  Create;
  inherited Create(paName, paId);
end;

destructor TTable.destroy;
begin

  inherited;
end;

procedure TTable.LoadFromXML(paNode: IXMLNode);
begin
  inherited LoadFromXML(paNode.ChildNodes['log_entity']);
end;

procedure TTable.save(paKam: IXMLNode; paKtory: Integer);
var temp: IXMLNode;
begin
  temp := paKam.AddChild('tabula_' + inttostr(paKtory));
end;

procedure TTable.SaveToXML(var paNode: Ixmlnode);
var
  n : IXMLNode;
begin
  n := paNode.AddChild('table');
  inherited SaveToXML(n);
end;

function TTable.vypis: String;
begin
//  result := 'X:' + inttostr(PosX) + ' Y: ' + inttostr(PosY);
end;

end.
